home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / hdf / specs / hdfspecs.lha / HDFSpecs.ch2 < prev    next >
Text File  |  1992-03-04  |  4KB  |  143 lines

  1. 2.1    NCSA HDF Specifications
  2.  
  3. The NCSA HDF General Purpose Interface    2.1
  4.  
  5. National Center for Supercomputing Applications
  6.  
  7. March 1989
  8.  
  9.                                                                 
  10.  
  11.  
  12.  
  13. 2.1    NCSA HDF Specifications
  14.  
  15. The NCSA HDF General Purpose Interface    2.1
  16.  
  17. National Center for Supercomputing Applications
  18.  
  19. March 1989
  20.  
  21.                                                                 
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. Chapter 2    The NCSA HDF General Purpose Interface
  29.  
  30.  
  31.  
  32. Chapter Overview
  33. Introduction
  34. Opening and Closing Files
  35. Finding Tags, Refs, and Element Lengths
  36. Reading and Writing Entire Data Elements
  37. Reading and Writing Part of a Data Element
  38. Manipulating Data Descriptors (DDs)
  39.  
  40. Chapter Overview
  41.  
  42. This chapter contains a list of the routines that make up the low 
  43. level interface. The interface is described in detail in the HDF 
  44. manual.
  45.  
  46.  
  47. Introduction
  48.  
  49. NCSA supports interfaces for HDF users╤both high level 
  50. interfaces to support certain application areas, such as image 
  51. processing, and a low level general purpose interface for 
  52. performing basic operations on HDF files.
  53.  
  54. Since the NCSA user community programs primarily in C and 
  55. Fortran, all of the HDF interfaces developed at NCSA are callable 
  56. from both C and Fortran programs. Accordingly, all of the 
  57. functions have both a C and a Fortran definition. For details, see 
  58. Chapters 4 and 5 in the NCSA HDF manual.
  59.  
  60. The routines in the general purpose interface enable you to build 
  61. and manipulate HDF files of any type, including those of your own 
  62. invention. All HDF applications developed at NCSA use these 
  63. routines as their basic building blocks. 
  64.  
  65.  
  66. Opening and Closing Files
  67.  
  68. The following calls are used to open and close HDF files.
  69.  
  70. DFopen    provides an access path to an HDF file. It also reads 
  71. into primary memory all of the DD blocks in the file. 
  72. In the current implementation, only one file can be 
  73. open at a time.
  74.  
  75. DFclose    updates the DD blocks, then closes the access path to 
  76. the file.
  77.  
  78.  
  79. Finding Tags, Refs, and Element Lengths
  80.  
  81. These routines make it possible to locate elements without 
  82. knowing their tags and reference numbers.
  83.  
  84. DFsetfind    initializes searches for elements using tags and 
  85. reference numbers. DFsetfind is closely tied to the 
  86. operation of DFfind.
  87.  
  88. DFfind    gets the results from searches of tags and reference 
  89. numbers.
  90.  
  91. Reading and Writing Entire Data Elements
  92.  
  93. There are two sets of routines for reading and writing data 
  94. elements. The first set of routines described here is used to store 
  95. and retrieve entire data elements. A second set of routines, 
  96. described in the next section, may be used if you wish to access only 
  97. part of a data element at a time.
  98.  
  99. DFputelement    adds or replaces elements in a file.
  100.  
  101. DFgetelement    obtains the data referred to by the tag/ref 
  102. combination that is passed to it.
  103.  
  104.  
  105. Reading and Writing Part of a Data Element
  106.  
  107. The second set of routines for reading and writing data elements 
  108. makes it possible to read or write all or part of a data element, in 
  109. contrast to the routines described above, which can only read or 
  110. write an entire element.
  111.  
  112. DFaccess    initiates a read or write on the data element with the 
  113. specified tag/ref combination.
  114.  
  115. DFread    reads a portion of a data element. It starts at the last 
  116. position left by a DFaccess, DFread, or DFseek 
  117. command and reads any data that remains in the 
  118. element up to a specified number of bytes.
  119.  
  120. DFwrite    appends data to a data element. It starts at the last 
  121. position left by a DFaccess or DFwrite command, 
  122. writes up to a specified number of bytes, then leaves 
  123. the write pointer at the end of the element.
  124.  
  125. DFseek    sets the read pointer to an offset within a data 
  126. element. The next time DFread is called, the read 
  127. occurs from the new position.
  128.  
  129.  
  130. Manipulating Data Descriptors (DDs)
  131.  
  132. These routines perform operations on DDs without altering the 
  133. data to which the DDs refer.
  134.  
  135. DFupdate    writes out the DD blocks necessary to update the file. 
  136. All data elements that have been written or partially 
  137. written to the file are given valid DDs.
  138.  
  139. DFdup    generates new references to data that is already 
  140. referenced from somewhere else.
  141.  
  142. DFdel    deletes a tag/ref from the list of DDs.
  143.